import render_helper from "../lib/render_helper.mjs";
import thin_render from "../lib/thin_render.mjs";

export default function explorer_template({ container, template }) {
  console.log({ container, template });
  let explorer = document.createElement("explorer");
  container.appendChild(explorer);
  render_helper(explorer, { height: "auto" });

  if (template.explorer.aside) {
    let aside = document.createElement("aside");
    explorer.appendChild(aside);
    thin_render(aside, template.explorer.aside);
  }

  let main = document.createElement("main");
  explorer.appendChild(main);

  if (template.explorer.main) {
    thin_render(main, template.explorer.main);
  }
}
